<template>
  <div></div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    query() {
      if (this.articlesData.length === 0 && this.isFirstQuery) {
        this.$message({
          message: "请先点击左侧机构树",
          type: "warning",
        });
        this.isFirstQuery = false; // 将isFirstQuery设置为false，表示不再是第一次点击查询
      } else {
        this.A0101 = null;
        this.A0184 = null;
        this.queryParams = [];
        var han = /^[\u4e00-\u9fa5]+$/;
        var cardId = /\d/g;
        var vals = this.searchName.trim(); //获取输入input中的val
        if (han.test(vals)) {
          //test()方法表示是否匹配，返回值为true 成功，false 匹配失败
          this.A0101 = this.searchName.trim();
          this.currentPage = 1;
        } else {
          if (cardId.test(vals)) {
            this.A0184 = this.searchName.trim();
            this.currentPage = 1;
          } else {
            this.A0101 = this.searchName.trim();
            this.currentPage = 1;
          }
        }
        this.initData();
      }
    },
  },
};
</script>

<style>
</style>